package com.cskaoyan.bean.lzpackage.lz_history;

import com.cskaoyan.bean.SearchHistory;
import lombok.Data;

import java.util.List;

@Data
public class HistoryData {
    private Integer total; //总的数据量，没有分页的情况下的数据量
    private Integer pages; //总的页码数
    private Integer limit; //当前页最多的数据量
    private Integer page; //当前页的页码
    private List<SearchHistory> list; //当前页的数据

    public static HistoryData data(long total, Integer pages, Integer limit, Integer page, List list) {
        HistoryData userData = new HistoryData();
        userData.setTotal((int) total);
        userData.setPages(pages);
        userData.setPage(page);
        userData.setLimit(limit);
        userData.setList(list);
        return userData;
    }
}
